package com.lsk.common.interceptor;

import com.alibaba.druid.support.http.WebStatFilter;
import com.jfinal.aop.Invocation;
import com.lsk.util.ReturnData;
import com.lsk.util.Syslog;


/**
 * Created by Administrator on 2018/5/7 0007.
 */
public class ExceptionInterceptor implements com.jfinal.aop.Interceptor {
    @Override
    public void intercept(Invocation inv) {
        try {
            inv.invoke();
        }catch (Exception e){
            Syslog.error(e);
            ReturnData returnData=new ReturnData();
            returnData.setCode("555555");
            returnData.setMsg("请输入正确的查询信息以查询数据");
            inv.getController().renderJson(returnData);
        }
    }
}
